﻿
namespace Pretext {
    /// <summary>
    /// Holds information relating to special tokens
    /// </summary>
    public class SpecialTokenInfo {
        public SpecialTokenInfo(TokenType type, TokenMatchedDelegate callback, SpecialTokenConditions conditions)
            : this(type, callback) {
            this.Conditions = conditions;
        }
        
        public SpecialTokenInfo(TokenType type, TokenMatchedDelegate callback)
            : this(type) {
            OnMatchedCallback = callback;
        }
        
        public SpecialTokenInfo(TokenType type, SpecialTokenConditions conditions)
            : this(type, null, conditions) { }

        public SpecialTokenInfo(TokenType type) {
            Type = type;
        }

        public TokenType Type { get; private set; }
        public TokenMatchedDelegate OnMatchedCallback { get; private set; }
        public SpecialTokenConditions Conditions { get; private set; }

    }
}